package com.x.Part4_抽象类;

/**
 * ClassName: Person
 * Package: IntelliJ IDEA
 * Description:
 * Written by HanXu
 * Create 2024.03.04 1:35
 */
abstract class Person {
    String name;

    public Person(){

    }

    public Person(String name){
        this.name=name;
    }

    //抽象方法只能在抽象类中,包含抽象方法的类必须是抽象类
    //抽象方法不能有方法体
    public abstract void eat();
    //方法体注释掉
    /*{
        System.out.println("eat");
    }*/

    public abstract void sleep();
}
